/**
 * 回溯相关接口
 */

import { axios as request } from '@/utils/request'

// 分页查询
export function getPageList(params) {
  return request({
    url: `/workflow/backtrack/page`,
    method: 'get',
    params
  })
}

// 新增/修改数据
export function save(data) {
  return request({
    url: '/workflow/backtrack/save',
    method: 'post',
    data
  })
}

// 主键查询
export function getBacktrack(id) {
  return request({
    url: `/workflow/backtrack/get/${id}`,
    method: 'get'
  })
}

// 逻辑删除
export function remove(id) {
  return request({
    url: `/workflow/backtrack/delete/${id}`,
    method: 'delete'
  })
}

// 根据主表Id查询明细表的数据
export function queryByParentId(id) {
  return request({
    url: `/workflow/backtrack/queryByParentId/${id}`,
    method: 'get'
  })
}
